from drg_group.yinchuan_2023.Base import message,intersect,SS_VALID
from drg_group.yinchuan_2023.DRG import MDCJ_DRG

def group(record):
  adrg_zd=["B07.x00x011","B07.x03","B35.300","D48.512","E85.413+L99.0*","L01.000x013","L03.003","L03.102","L05.900","L08.910","L23.200","L23.700","L40.800","L42.x00","L43.901","L50.000","L50.300","L50.801","L50.802","L50.900","L53.100","L53.800","L56.000","L56.400","L57.000","L60.000","L60.200","L63.200","L63.900","L65.903","L66.200","L66.900","L70.003","L70.004","L70.900","L71.800","L71.900","L72.000","L72.101","L72.102","L72.103","L72.104","L72.105","L72.106","L72.200","L72.900x001","L72.900x002","L72.901","L72.902","L72.903","L72.904","L72.905","L73.800x007","L73.900","L74.100","L75.000","L80.x00","L81.800","L82.x00","L85.000","L85.200","L85.800","L85.900x001","L90.000","L91.002","L91.800","L92.100","L92.300","L94.200","L98.501","L98.701","L98.800","L98.802","L98.804","M35.600","Q82.000","Q82.201","Q82.400","Q85.801","Q85.900","R21.x00x001","R21.x02","Z41.100x002","Z41.100x006","Z42.202","Z42.300x001","Z42.304","Z42.400x001","Z42.401"]
  adrg_zd1=[]
  adrg_ss=[]
  adrg_ss1=[]
  adrg_ss2=[]
  dept_list=[]
  if True and record.zdList[0] in adrg_zd:
    message('符合JZ1入组条件，匹配规则：主诊断匹配')
    
    if MDCJ_DRG.JZ19_group(record):
      return 'JZ19'

    return 'JZ1'
  else:
    return ''

